{template 'wslm','header'}
<script language="JavaScript">
function search_submit()
{
	if($('#asktitle').val() =="")
    {
		$('#asktitle').focus();
		alert("请填写您要搜索的问题.");
		return false;
	}
	var keywords=$('#asktitle').val();
	redirect("{$M[url]}search.php?keywords="+keywords);
}
</script>
<!--begin main-->
<div id="main">
  <!--begin left-->
  <div id="main_l">
    <div id="mian_l_1">
      <!--begin 问吧导航-->
      <div id="ask_nav_top">
        <h3>问吧导航</h3>
      </div>
      <div id="ask_nav">
{loop $C $cat}
{if !$cat[parentid]}{php $cols=1;}
<dl>
<dt><a href="{$cat[url]}" >{$cat[catname]}</a></dt>
<dd>{loop $C $childcat}
{if $cols<4 && $childcat[parentid]==$cat[catid]}<a href="{$childcat[url]}" >{$childcat[catname]}</a>
{php $cols++;}
{/if}
{/loop}<a href="{$cat[url]}" >>></a>
</dd></dl>
{/if}
{/loop}
      </div>
      <div id="ask_nav_btm"></div>
      <!--end 问吧导航-->
      <!--问吧广告位-->
    </div>
    <div id="mian_l_2">
      <!--begin 发布问题-->
      <div id="box_1">
<form name="wordform" action="{$M[url]}question.php" method="post">
<input name="title" id="asktitle" type="text" style="width:260px;" />
<input type="submit" value="我要提问" style="width:60px;" /> 
<input type="button" value="搜索答案" name="search" onClick="search_submit();" style="width:60px;" />
		</form>
        <div id="search_div">
        <ul id="tl">
        </ul>
        
      </div>
      </div>
      
      <!--end 发布问题-->
      <div class="cat">
        <h3><a href="{$M[url]}browse.php?action=nosolve"><img src="images/more.gif" alt="更多"/></a>待解决问题<span>({$nosolve_ques_count})</span></h3>
        <ul>{tag_待解决问题}</ul>
      </div>
      <!--广告位-->
      <div class="ad mar_10"><script language="javascript" src="data/js.php?id=4"></script></div>
      <div class="cat">
        <h3><a href="{$M[url]}browse.php?action=solve"><img src="images/more.gif" alt="更多"/></a>已解决问题<span>({$solve_ques_count})</span></h3>
        <ul>{tag_已解决问题}</ul>
      </div>
    </div>
  </div>
  <!--end left-->
  <!--begin right-->
  <div id="main_r">
    <h4>热点问题</h4>
    <div>
      <ul class="text_list">{tag_问吧首页热点问题}</ul>
    </div>
    <h4>推荐问题</h4>
    <div class="text_list">
      <ul>{tag_问吧首页推荐问题}</ul>
    </div>
     <h4 class="tag_box">积分排行<span class="tag_menu_1"><a href="{$M[url]}creditlist.php?action=week" onMouseOver="showContent('0')" id="nav0">上周</a><a href="{$M[url]}creditlist.php?action=month" onMouseOver="showContent('1')" id="nav1">上月</a><a href="{$M[url]}creditlist.php?action=all" onMouseOver="showContent('2')" id="nav2" class="selected">总排行</a></span></h4>
    <div id="content0" style="display:none;">
      <ul class="text_list_1">
	  {tag_上周积分排行榜}
      </ul>
    </div>
	<div id="content1" style="display:none;">
      <ul class="text_list_1">
	  {tag_上月积分排行榜}
      </ul>
    </div>
	<div id="content2">
      <ul class="text_list_1">
	  {tag_总积分排行榜}
      </ul>
    </div>
  </div>
  <!--end right-->
</div>
<script language="JavaScript">
<!--
	function showContent(id)
	{
		for (var i = 0;i < 3;i++)
		{
		var nav = document.getElementById("nav" + i);
		var content = document.getElementById("content" + i);
			if (i == id)
			{
			nav.className = 'selected';
			content.style.display = "";
			}
			else
			{
			nav.className = '';        
			content.style.display = "none";
			}
		}
	}
	var modurl = '{$MODULE['ask']['url']}';
 //-->
</script>
<script type="text/javascript" src="{WSLM_PATH}images/js/ask_search_json.js"></script>
<!--end main-->
<!--begin foot-->
{template 'wslm','footer'}